﻿Company.UI.Tab = {};


/**
* Highlights a tab with an ID corresponding to a specified pageName
* @param {String} pageName the ID of the tab to set
*/
Company.UI.Tab.setTab = function(pageName) {
	try {
		var tabSpans = $$('#tabCell span');

		$A(tabSpans).each(function(tab) {
			if (tab.id === pageName + "Tab") {
				$(tab).classNames().set("currentTab");
			} else {
				$(tab).classNames().set("menuTab");
			}
		});
	} catch (e) {
		Company.Error.ErrorHandler.consoleError(e);
	}
}
